﻿@model eShop.Web.Admin.Models.AttributeListModel

@section header{
    <title>属性列表</title>
    <link type="text/css" rel="stylesheet" href="/administration/css/site.css" />
    <link type="text/css" rel="stylesheet" href="/administration/css/style.css" />
    <script type="text/javascript" src="/administration/scripts/jquery.js"></script>
    <script type="text/javascript" src="/administration/scripts/showlist.js"></script>
}

@section body{
    <h1 class="rightH1">
        属性管理 &gt;&gt; 属性列表
        <div class="right">
            @*<a href="@Url.Action("categorylist")" class="menuBT"><img src="/administration/images/goback.jpg" />返回分类</a>*@
            <a href="@Url.Action("addattribute", new { cateId = Model.CateId })" class="menuBT"><img src="/administration/images/add.jpg" />添加</a>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </h1>

    @using (Html.BeginForm("attributelist", "category"))
    {

        <input type="hidden" value="@Model.CateId" id="CateId" name="CateId" />
        <div class="table_top"></div>
        <div style="padding-left:15px;">
            <table class="tablelist">
                <thead>
                    <tr>
                        <th width="74" align="left">编号</th>
                        <th align="left">属性名称</th>
                        <th width="200" align="left">属性分组</th>
                        <th width="100" align="left">展示类型</th>
                        <th width="100" align="left">筛选属性</th>
                        <th width="100" align="left">排序</th>
                        <th width="160" align="left">管理操作</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (DataRow row in Model.AttributeList.Rows)
                    {
                        <tr>
                            <td>@row["attrid"]</td>
                            <td>@row["name"]</td>
                            <td>@row["attrgroupname"]</td>
                            <td>
                                @{
                                    if (row["showtype"].ToString() == "0")
                                    {
                                        @:文字
      }
                                    else
                                    {
                                        @:图片
      }
                                }
                            </td>
                            <td>
                                @{
                                    if (row["isfilter"].ToString() == "0")
                                    {
                                        @:否
      }
                                    else
                                    {
                                        @:是
      }
                                }
                            </td>
                            <td>@row["displayorder"]</td>
                            <td>
                                @Html.ActionLink("[值列表]", "attributevaluelist", new { attrId = row["attrid"] }, new { @class = "editOperate" })|
                                @Html.ActionLink("[编辑]", "editattribute", new { attrId = row["attrid"] }, new { @class = "editOperate" })|
                                @Html.ActionLink("[删除]", "delattribute", new { attrId = row["attrid"] }, new { @class = "deleteOperate" })
                            </td>
                        </tr>
                                    }
                </tbody>
            </table>
        </div>
                                    }
    <div class="table_bottom"></div>

}